﻿using CleanLite.Domain.Entities;
using CleanLite.DynamicApi;
using SqlSugar;

namespace CleanLite.Application.Services.DbFirst
{
    public class DbService(ISqlSugarClient db) : IDynamicApi
    {
        private readonly ISqlSugarClient db = db;

        public string GetDbTime()
        {
            try
            {
                db.CodeFirst.SetStringDefaultLength(200).InitTables(typeof(Sys_Menu));
            }
            catch (Exception ex)
            {
                return ex.Message;
            }
            return "Ok";
        }
    }
}